Skip to content

[6.x] Move alias support to Yii adapter - #19454

Closed
riasvdv wants to merge 8 commits into
6.xfrom
feature/remove-core-aliases
Closed

riasvdv wants to merge 8 commits into
6.xfrom
feature/remove-core-aliases

Conversation

@riasvdv

@riasvdv riasvdv commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

Removes path alias support and the alias dependency from the core codebase, replacing core usages with Laravel helpers and the Path service. Moves legacy configuration, helper, Twig, plugin, Composer, and icon alias compatibility into the Yii 2 adapter, and updates affected settings copy and tests.

Breaking change

The core UI fields that explicitly advertised or suggested aliases were:

Page Fields
Installer Base URL
Settings → Sites Base URL
Settings → Filesystems Base URL
Settings → Filesystems → Local Folder Base Path

Several additional fields implicitly accepted aliases because their values passed through Env::parse():

  • Settings → General: System Name, System Status, Time Zone
  • Settings → Sites: Name, Status, Base URL, Language
  • Settings → Site Groups: Name
  • Settings → Email: System Email Address, Sender Name, Reply-To Address, HTML Email Template, Mailer, and corresponding site overrides
  • Settings → Assets → Volumes: Asset Filesystem, Subpath, Transform Filesystem, Transform Subpath
  • Section/entry-type preview targets: URL Format
  • Plugin license keys
  • General config-backed fields such as compiledTemplatesPath, cpIconUrl, brokenImagePath, and tempAssetUploadFs

Third-party settings fields also lose alias suggestions if they use suggestAliases, cpEnvSuggestions(true, …), or getEnvSuggestions(true, …).

@linear-code

linear-code Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

CMS-2360

@riasvdv

riasvdv commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor Author

@brandonkelly Adding just two methods to the Path service and replacing everything else with Laravel helpers seems to cover all of our own Alias usage

This does break sites that use Aliases in a way we can't easily migrate automatically or intercept using the yii2-adapter so will require extra work from developers.

…iases

# Conflicts:
#	composer.lock
#	resources/js/modules/install/components/SiteFields.vue
#	src/Cp/SelectOptions.php
#	src/Filesystem/Filesystems/Local.php
#	src/Http/Controllers/InstallController.php
#	src/Http/Controllers/Settings/SitesController.php
@github-actions

github-actions Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

📚 Storybook previews

@craftcms/ui — open Storybook

No changed components detected in this Storybook.

resources/js — open Storybook

No changed components detected in this Storybook.

@riasvdv

riasvdv commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Not removing aliases, will remove @web

@riasvdv riasvdv closed this Aug 25, 2026
@riasvdv
riasvdv deleted the feature/remove-core-aliases branch September 5, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant